#include <stdio.h>

void changepoint(int *pa,int* pb){
	int *temp=pa;
	pa=pb;
	pb=temp;
}
void changepoint2(int **ppa,int **ppb){
	int* temp=*ppa;
	*ppa=*ppb;
	*ppb=temp;
}
int main(){
	int a=10;
	int b=20;
	int *pa=&a;
	int *pb=&b;
	printf("*pa:%d\n",*pa);
	printf("*pb:%d\n",*pb);
	printf("a:%d\n",a);
	printf("b:%d\n",b);
	printf("--------changeporint()---------\n");
	changepoint(pa,pb);
	printf("*pa:%d\n",*pa);
	printf("*pb:%d\n",*pb);
	printf("a:%d\n",a);
	printf("b:%d\n",b);
	int*ppa=&pa;
	int*ppb=&pb;
	changepoint2(ppa,ppb);
	printf("-------changepoint2()----------\n");
	printf("*pa:%d\n",*pa);
	printf("*pb:%d\n",*pb);
	
}
